<?php
class MovimientoBanco extends AppModel {
	var $name = 'MovimientoBanco';
	var $useTable = 'movimientos_bancos';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'cuenta_bancaria_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'documento' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '15')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'created' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'descripcion' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '255')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'monto' => array(
			'decimal' => array(
				'rule' => array('decimal', 2)
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
	);

	var $belongsTo = array(
		'CuentaBancaria' => array(
			'className' => 'CuentaBancaria',
			'foreignKey' => 'cuenta_bancaria_id'
		)
	);
}
?>